package com.liuqi.voicenotes.domain

import com.liuqi.voicenotes.data.Task
import org.junit.Assert.assertNotNull
import org.junit.Assert.assertTrue
import org.junit.Test

class ParserTest {
    @Test
    fun parse_next_monday_morning() {
        val text = "下周一早上开会，优先级高"
        val task = Parser.parseSpeechToTask(text, 0)
        assertNotNull(task)
        assertTrue(task!!.dueAtMillis != null)
    }

    @Test
    fun parse_today_afternoon_time() {
        val text = "今天下午3点提醒买牛奶"
        val task = Parser.parseSpeechToTask(text, 0)
        assertNotNull(task)
        assertTrue(task!!.dueAtMillis != null)
    }
}